package com.zj.ecology.list;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.zj.base.view_injector.ViewBinder;
import com.zj.base.view_injector.annotantions.IdRes;
import com.zj.base.view_injector.annotantions.LayoutRes;
import com.zj.ecology.R;
import com.zj.ecology.ViewBinderView;

/**
 * Created by zhaojie on 2018/6/5.
 */

@LayoutRes(R.layout.activity_viewbinder)
public class ViewBinderActivity extends AppCompatActivity {

    @IdRes(R.id.vb_tv01)
    private TextView tv01;
    @IdRes(R.id.vb_tv02)
    private TextView tv02;
    @IdRes(R.id.vb_tv03)
    private TextView tv03;
    @IdRes(R.id.vb_tv04)
    private TextView tv04;

    @IdRes(R.id.vb_v)
    private ViewBinderView v;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ViewBinder.bind(this);
        v.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Log.e("zjj -------", "" + tv01.toString() + "    " + tv02 + "    " + tv03 + "     " + tv04);
            }
        });
    }
}
